{block name="title" prepend}{$LNG.lm_research}{/block}
{block name="content"}
<table style="width:780px">
  	{$td=3}
	{foreach $BuildInfoList as $ID => $Element}
        {if $td==3}
            <tr>
                <td>
             {$td=0}
         {else} 
         	<td>
         {/if}      
            {$td= $td +1}
	<table class="b_box">
      <tr>
		<td rowspan="3" style="width:60px;">
			<a href="#" onclick="return Dialog.info({$ID})">
				<img src="{$dpath}gebaeude/{$ID}.gif" alt="{$LNG.tech.{$ID}}" width="60" height="60">
			</a>
		</td>
		<td>
			<a href="#" onclick="return Dialog.info({$ID})">{$LNG.tech.{$ID}}<br />{if $Element.level > 0} ({$LNG.bd_lvl} {$Element.level}{if $Element.maxLevel != 255}/{$Element.maxLevel}{/if}){/if} </a> 
            
		</td>
	</tr>
    <tr>
    	<td style="text-align:left;">
        	<img src="{$dpath}images/921.gif" alt="{$LNG.tech.921}" height="20" />
            <span style="font-weight:bold; {if $darkmatter >= $Element.costTM}color:#0F0;{else} color:#F00;{/if}">
            	{$Element.costTM|number}
         	</span>
        </td>
    </tr>
	<tr>
		<td>
                        {if $Element.maxLevel == $Element.level}
                            <span style="color:red">{$LNG.bd_maxlevel}</span>
                        {else}
                        	{if $darkmatter >= $Element.costTM}
                                <form action="game.php?page=dmtech&amp;mode=up" method="post">
                        		    <input type="hidden" name="tech" value="{$ID}">
                                    <button type="submit">
                                        <span style="color:#FC0">Исследовать  до <span style="color:#F30">{$Element.level + 1}</span></span>
                                    </button>
                                </form>
                                {else}
                                	<a href='game.php?page=trader&amp;mode=obmen'><span style="font-weight:bold; color:#0F0">{$LNG.replenish} ТМ</span></a>
                                {/if}
                        {/if}
		</td>
	</tr>
    </table>
    {if $td==3}
        </td>
    </tr>
    {else} 
        </td>
    {/if} 
	{/foreach}
        {if $td!=3}
    </tr>
    {/if}
</table>
{/block}